#ifndef __MYTREE_H_
#define __MYTREE_H_

#include "LinkTree.h"
#include <cstring>

struct FileInfo
{
    FileInfo(const std::string& name):name(name),fileSize(0),AppendName(""),LeafName(name){};
    std::string name;
    std::string AppendName;  //父节点名称
    std::string LeafName;  //叶子节点名称
    size_t fileSize;
};

class MyFileSystem
{
public:
    MyFileSystem(const std::string & path);
    ~MyFileSystem();

    static void Free(void * p);

    static void Print(void * p);

    void show();

    void FindByFileName(const std::string& namePtr);
private:
    void ExploreDir(TreeNode *parent,FileInfo * path);
    LinkTree tree;
};




#endif


 